
import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';
import '../application.dart';
import 'package:pdf_test/route/routes.dart';

import 'fluro_convert_utils.dart';

class NavigatorUtil {
  static _navigateTo(BuildContext context, String path,
      {bool replace = false,
        bool clearStack = false,
        Duration transitionDuration = const Duration(milliseconds: 250),
        RouteTransitionsBuilder? transitionBuilder}) {
    Application.router.navigateTo(context, path,
        replace: replace,
        clearStack: clearStack,
        transitionDuration: transitionDuration,
        transitionBuilder: transitionBuilder,
        transition: TransitionType.material);
  }

  /// 查看PDF页面
  static void gotoPDFPage(BuildContext context) {
    _navigateTo(context,
        "${Routes.pdfPage}",
        clearStack: true);
  }
}